package com.longka.service;

import com.longka.bean.Book;
import com.longka.dao.BooksInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/3/6.
 */
@Service
public class BooksService {

    @Autowired
    BooksInfoDao booksInfoDao;

    public List<Book> queryAll() {
        return booksInfoDao.queryAll();
    }

    public int delete(int bookId) {
        return booksInfoDao.delete(bookId);
    }

    public int add(String bookname, String author, String publishTime, int grade) {
        return booksInfoDao.add(bookname, author, publishTime, grade);
    }
}
